clippedShadow
Creates a clipped replacement for the regular shadow Modifier.
Refer to shadow's docs for parameter details.
A clippedShadow overload that can be tinted with the library's color compat mechanism on API levels before 28, the earliest version to support the native shadow colors.
Refer to shadow's docs for details on the first five parameters: elevation, shape, clip, ambientColor, and spotColor.
colorCompat takes a Color that's used to tint the shadow on API levels 27 and below. If the passed value is Color.Black – the default shadow color – no tint is applied. If Color.Unspecified is passed, the actual value is calculated as a blend of the ambientColor and spotColor, mixed in proportion to their current theme alphas. Setting any other value disables this behavior.
NB: The color blending formula that's currently used gives good results only if the ambient and spot colors are both fully opaque; i.e., only if both have maximum alpha values.
forceColorCompat is available to force the color compat tinting to be used on API levels 28 and above.